home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / rpm / stringbuf.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-10-22  |  857 b   |  60 lines

  1. #ifndef _STRINGBUF_H_
  2. #define _STRINGBUF_H_
  3.  
  4. /** \file lib/stringbuf.h
  5.  *
  6.  */
  7.  
  8. /**
  9.  */
  10. typedef /*@abstract@*/ struct StringBufRec *StringBuf;
  11.  
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15.  
  16. /**
  17.  */
  18. /*@only@*/ StringBuf newStringBuf(void)
  19.     /*@*/;
  20.  
  21. /**
  22.  */
  23. /*@null@*/ StringBuf freeStringBuf( /*@only@*/ /*@null@*/ StringBuf sb)
  24.     /*@modifies sb @*/;
  25.  
  26. /**
  27.  */
  28. /*@unused@*/
  29. void truncStringBuf(StringBuf sb)
  30.     /*@modifies sb @*/;
  31.  
  32. /**
  33.  */
  34. /*@observer@*/ char * getStringBuf(StringBuf sb)
  35.     /*@*/;
  36.  
  37. /**
  38.  */
  39. void stripTrailingBlanksStringBuf(StringBuf sb)
  40.     /*@modifies sb @*/;
  41.  
  42. /**
  43.  */
  44. #define appendStringBuf(sb, s)     appendStringBufAux(sb, s, 0)
  45.  
  46. /**
  47.  */
  48. #define appendLineStringBuf(sb, s) appendStringBufAux(sb, s, 1)
  49.  
  50. /**
  51.  */
  52. void appendStringBufAux(StringBuf sb, const char * s, int nl)
  53.     /*@modifies sb @*/;
  54.  
  55. #ifdef __cplusplus
  56. }
  57. #endif
  58.  
  59. #endif    /* _STRINGBUF_H_ */
  60.